import '@css/login.css'

const sumitInsruance = document.getElementById('sumitInsruance')
// 注册点击事件
sumitInsruance.addEventListener('click',()=>{
    console.log( document.getElementById('userName'));
    const userName = document.getElementById('userName').value
    const userAccount= document.getElementById('userAccount').value
    const userPhone = document.getElementById('userPhone').value
    const userPassWord = document.getElementById('userPassWord').value
    if(userName.length==0||userAccount.length==0||userPhone.length==0||userPassWord.length==0){
        alert('注册失败，请重新检查您的用户名，账号，手机号以及密码')
    }else{
        const admin3 = {'userName':userName,'userAccount':userAccount,'userPhone':userPhone,'userPassWord':userPassWord}
        localStorage.setItem('admin3',JSON.stringify(admin3))
             alert('注册成功')
             location = 'submit.html'
    }
})